package op3;

import jdk.internal.util.xml.impl.Input;

import java.io.*;
import java.util.Scanner;

public class exp4 {
    Scanner in = new Scanner(System.in);
    static class Head{
        int position;
        boolean isVisit;
    }
    void visit(Head head){
        System.out.println("visit: " + head.position);
        head.isVisit = true;
    }
    int readInputKeyBoard(Head[] head, int cur, int max){
        System.out.println("please input current position:");
        cur = in.nextInt();
        System.out.println("please input will visit position:");
        int i = 0;
        for (; i < max; i++) {
            System.out.println(head[i].position);
            head[i].isVisit = true;
            if(head[i].position < 0) break;
        }
        return i;
    }

//    int readInputFile(Head head, int cur, int max){
//        System.out.println("please input filename:");
//        String filename = in.nextLine();
//        try (InputStream inputStream = new FileInputStream(filename)){
//            byte[] bytes = new byte[256];
//            inputStream.read(bytes);
//
//        } catch (IOException e) {
//            System.out.println("open " + filename +" error");
//            return -1;
//        }
//    }
}
